<?php

declare(strict_types=1);

namespace App\Controller\Cloudh5;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\RequestCloudh5ApiMiddleware;
use Hyperf\HttpServer\Contract\RequestInterface;
use App\Model\PssModel\Manager;

/**
 * 云仓H5移动端登录接口
 * @Controller(prefix="/Cloudh5/AdminUserLogin")
 * @Middleware(RequestCloudh5ApiMiddleware::class) 
 */
class AdminUserLoginController extends AbstractController
{
    /**
     * 管理用户登录
     * @RequestMapping(path="UserLogin", methods="post")
     * @param RequestInterface $request
     */
    public function UserLogin(RequestInterface $request)
    {
        return Manager::instance()->login($request->all());
    }
}